#include <serial_comm.h>

int main(int argc, char* argv[]){
  SerialComm comm = SerialComm("/dev/ttyACM0", 9600);
  printf("%d\n", comm.isValid());

  char* input = new char[100];
  while(true){
    
    size_t nbytes = 100;
    printf("Enter string to send: ");
    getline(&input, &nbytes, stdin);

    if(comm.sendString((unsigned char *) input, nbytes) == FAILURE_COMM){
      fprintf(stderr, "Unable to send string.\n");
      return -1;
    }

  }
}
